package com.lagou.filter;

/**
 * Description: .
 *
 * @author Wengy
 * @since JDK 1.8
 * @since 1.0.0
 */
public class RequestInfo implements Comparable<RequestInfo> {
    
    long startTime;
    
    String methodName;
    
    int timeCost;
    
    public long getStartTime() {
        return startTime;
    }
    
    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }
    
    public String getMethodName() {
        return methodName;
    }
    
    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }
    
    public int getTimeCost() {
        return timeCost;
    }
    
    public void setTimeCost(int timeCost) {
        this.timeCost = timeCost;
    }
    
    @Override
    public int compareTo(RequestInfo o) {
        int result = 0;
        if(this.getTimeCost()>o.getTimeCost()) {
            result = 1;
        } else {
            result = -1;
        }
        return result;
    }
}
